<template>
    <div>Home</div>
    <router-link to="/home/music">
        <button>music</button>
    </router-link>
    <router-link :to="{ name: 'New' }">
        <button>new</button></router-link>
    <!-- 在v4版本中keep-alive的使用 -->
    <router-view v-slot="{ Component }">
        <keep-alive>
            <component :is="Component"></component>
        </keep-alive>
    </router-view>

</template>

<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
    name: 'Home'
})
</script>
<script lang="ts" setup>

</script>

<style lang="less" scoped>

</style>